/**
 * MCSearch.java
 */
package commands.model;


/**
 * Request to search for files in the list of shared files which match given criteria.
 * @author Michal Kolodziejski
 */
public class MCSearch extends ModelCommand {
	/** A name of a searched file. It may also be a set of keywords delimited by whitespaces. */
	private String searchName;
	/** A minimum size of a searched file. */
	private long minSize;
	/** A maximum size of a searched file. */
	private long maxSize;
	/** ID of search (from NC) */
	private int searchID;

	
	/**
	 * Constructor
	 * @param searchName a name of a searched file; it may also be a set of keywords delimited by whitespaces.
	 * @param minSize a minimum size of a searched file
	 * @param maxSize a maximum size of a searched file
	 */	
	public MCSearch(String searchName, long minSize, long maxSize, int searchID ){
		super(ModelCommandType.SEARCH);
		this.searchName = searchName;
		this.minSize = minSize;
		this.maxSize = maxSize;
		this.searchID = searchID;
	}

	/**
	 * 
	 * @return search ID
	 */
	public int getSearchID()
	{
		return searchID;
	}

	/**
	 * @return the name of a searched file; it may also be a set of keywords delimited by whitespaces
	 */
	public String getSearchName() {
		return searchName;
	}

	/**
	 * @return the maximum size of a searched file
	 */
	public long getMaxSize() {
		return maxSize;
	}

	/**
	 * @return the minimum size of a searched file
	 */
	public long getMinSize() {
		return minSize;
	}	
	
}
